<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
	<link rel="stylesheet" th:href="@{/css/style.css}"></link>
    <title>登录</title>

</head>

<body>
<div class="login">
<form th:action="@{/login}" method="post">
    <input type="text" name="username" placeholder="用户名" maxlength="200" required="required"/>
   	<input type="password" name="password" maxlength="200" placeholder="密码" required="required"/>
   	<div th:if="${param.error}" th:switch="${session.SPRING_SECURITY_LAST_EXCEPTION.message}">
   		<span th:case="'loginname is null'" class="red">用户名不存在!</span>
   		<span th:case="'Bad credentials'" class="red">密码错误!</span>
   	</div>
    <input type="submit" class="btn btn-primary btn-block btn-large" value="登录"/>

</form>
</div>
</body>

</html>